package com.tuyrt.hi.ui.banner.core;

import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.viewpager.widget.ViewPager;

import com.tuyrt.hi.ui.banner.indicator.HiIndicator;

import java.util.List;

/**
 * author: Administrator on 2021/5/6.
 * desc:
 */
public interface IHiBanner {

    void setBannerData(@LayoutRes int layoutResId, @NonNull List<? extends HiBannerMo> models);
    void setBannerData( @NonNull List<? extends HiBannerMo> models);

    void setHiIndicator(HiIndicator<?> hiIndicator);

    void setAutoPlay(boolean autoPlay);

    void setLoop(boolean loop);

    void setIntervalTime(int intervalTime);

    void setBindAdapter(IBindAdapter bindAdapter);

    void setOnPageChangeListener(ViewPager.OnPageChangeListener onPageChangeListener);

    void setOnBannerClickListener(OnBannerClickListener onBannerClickListener);

    void setBannerScrollDuration(int duration);

    interface OnBannerClickListener{
        void setBannerClick(@NonNull HiBannerAdapter.HiBannerViewHolder viewHolder,  @NonNull HiBannerMo bannerMo, int position);
    }
}
